package main.listeners;

import logic.status.StatusValueManager;

public class StatusKeeperContainer extends KeeperContainer {
	
	protected float diff;
	protected StatusListenerKeeper keeper;
	
	public StatusKeeperContainer(StatusListenerKeeper keeper) {
		super(null);
		this.keeper = keeper;
	}
	
	@Override
	protected void addListener(IListenerContainer container, Object l) {
		((StatusValueManager<?>)container).addListener(l, diff);
	}
	
	@Override
	protected IListenerContainer getListenerContainer(Class<?> c) {
		return keeper.getListenerContainer(c, diff);
	}
	
	public void setDiff(float diff) { this.diff = diff; }
}